import { Application } from 'egg';

export default (app: Application) => {
    const { STRING, DATE, CHAR } = app.Sequelize;
    const model = app.model.define('Feedback', {
        feedback_id: { type: CHAR(32), primaryKey: true },//主键
        feedback_title: STRING(500),//标题
        feedback_content: STRING(500),//内容
        feedback_phone: STRING(32),//联系方式
        feedback_picture: STRING(200),//图片
        feedback_time: DATE(0),//发送时间
        created_by: CHAR(32),
        updated_by: CHAR(32),
        is_delete: CHAR(1),
    }, { tableName: 't_feedback' });
    return model;
};

export class Feedback {
    feedback_id: string;
    feedback_title: string;
    feedback_content: string;
    feedback_phone: string;
    feedback_picture: string;
    feedback_time: string;
    created_by: string;
    updated_by: string;
    is_delete: string;
}
